package com;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class InputTest {
   public static void main(String[] args) throws IOException {
//	   FileInputStream fis=new FileInputStream("D:/xj/aa.txt");
	   FileInputStream fis=new FileInputStream("D:/eclipse/eclipse.ini");
	   FileOutputStream fos=new  FileOutputStream("d:/xj/eclipse.ini");
	   StringBuilder sb = new StringBuilder();
	   long start = System.currentTimeMillis();
	   int b=0;
	   byte [] buf = new byte[1024];
	   while((b=fis.read())!=-1){
		   sb.append((char)b);
		   fos.write(b);
	   }
	   long end = System.currentTimeMillis();
       System.out.println(sb.toString());
	   while((b=fis.read(buf))!=-1){
		   fos.write(buf, 0, b);
	   }
   }
}
